package com.sz.exce.controller;

import com.sz.exce.entity.Log;
import com.sz.exce.service.LogService;
import com.sz.exce.vo.LogQueryVO;
import com.sz.exce.vo.PageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LogController {
    @Autowired
    LogService logService;
    @PostMapping("/query/logs")
    public LogQueryVO getLogs(@RequestBody PageVO vo){
        return logService.getLogs(vo);
    }
    @PostMapping("/add/log")
    public void addLog(@RequestBody Log log){
        logService.addLog(log);
    }
}
